#define CAPACITY 100
#ifndef myDatatype_H   
#define myDatatype_H 

/*外码要与主码内容一致，可以为空，但不能不同*/

/*结构声明*/
typedef struct SupplierManagement				/*供应商管理*/
{
	char supNo[CAPACITY];						/*供应商编号*/
	char supName[CAPACITY];						/*供应商名称*/
	char supName_short[CAPACITY];				/*供应商简称*/ 
	char supAddress[CAPACITY];					/*地址*/ 
	int supPhone;								/*公司电话*/ 
	char supMail[CAPACITY];						/*邮件*/ 
	char supLinkman[CAPACITY];					/*联系人*/
	int supLinkman_phone;						/*联系人电话*/ 
	char supNote[CAPACITY];						/*备注*/
}sup; 

typedef struct CommodityManagement				/*商品管理*/
{
	char comNo[CAPACITY];						/*商品编号*/
	char comName[CAPACITY];						/*商品名称*/
	double comPrice;							/*商品价格*/
	char supNo[CAPACITY];						/*供应商编号*/
	char comIntro[CAPACITY];					/*商品介绍*/
	char comNote[CAPACITY];						/*备注*/
}com;

typedef struct StaffManagement					/*员工管理*/
{
	char staNo[CAPACITY];						/*员工编号*/
	char staName[CAPACITY];						/*员工姓名*/
	char staPassword[CAPACITY];					/*员工密码*/
	char staRank[CAPACITY];						/*员工级别*/
	int staPhone;								/*员工电话*/
	double staWage;								/*员工工资*/
	char staNote[CAPACITY];						/*备注*/
}sta;

typedef struct MasterPurchaseManagement			/*采购主表数据*/
{
	char masterPurNo[CAPACITY];					/*采购清单号*/
	char staNo[CAPACITY];						/*员工编号（外码）*/
	int	purNum;									/*采购数量*/
	double totalPrice;							/*采购总价*/
	char purTime[CAPACITY];						/*采购时间*/
	char purNote[CAPACITY];						/*备注*/
}masterPur;

typedef struct DetailPurchaseManagement			/*采购明细数据*/
{
	char detailPurNo[CAPACITY];					/*采购明细号*/
	char masterPurNo[CAPACITY];					/*采购清单号（外码）*/
	char comNo[CAPACITY];						/*商品编号（外码）*/
	int purNum;									/*采购数量*/
	double singlePrice;							/*商品单价*/
	double totalPrice;							/*商品总价*/
	char purNote[CAPACITY];						/*备注*/
}detailPur;

struct Node
{
	void *data;
	struct Node *next;	
};

#endif